1. Field
Apparatuses and methods consistent with exemplary embodiments relate to determining colors of a foreground of an image, and more particularly, to determining foreground colors even from an inaccurately detected foreground in the image.
2. Description of the Related Art
Color determining and sorting techniques are used for determining colors of objects from images and sorting the determined colors. These techniques are widely used in applications such as image analysis and video surveillance including video search, object search, and object tracking.
In the related art, color determination is carried out by calculating a foreground mask of a moving object using a motion detection technique, and determining a dominant color of a region of the foreground mask as a representative color of the object.
The color determination in the related art is significantly affected by the accuracy of foreground mask calculation. However, a calculated foreground mask does not often match a moving object because of algorithmic limitations.
In most algorithms, a foreground mask is set to be calculated to be greater than the actual region of an object, and thus the foreground mask may include background pixels.
FIGS. 1A and 1B are exemplary views illustrating results of foreground detection performed according to the related art. Referring to FIG. 1B, a region denoted by a dashed line is a foreground mask region calculated using an algorithm of the related art, and gray, which is the color of stairs that people step on in FIG. 1A, is calculated as the dominant color, that is, the representative color of the foreground mask region.
For example, although a color that a person intends to perceive in ground truth data is the color of a military uniform (for example, green), a totally different color may be detected, and thus, incorrect results may be obtained in a later video search process.